package com.uek.service;

import com.uek.mapper.SysUserMapper;
import com.uek.pojo.SysUser;
import com.uek.pojo.SysUserExample;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class UserServiceImpl implements UserService{
    @Autowired
    SysUserMapper sysUserMapper;
    @Override
    public List<SysUser> getUser(String uname, String pw) {
        SysUserExample example = new SysUserExample();
        SysUserExample.Criteria criteria = example.createCriteria();
        criteria.andUserNameEqualTo(uname);
        criteria.andUserPasswordEqualTo(pw);
        List<SysUser> userlist = sysUserMapper.selectByExample(example);
        return userlist;
    }
}
